var inquirer = require('inquirer');
require('shelljs/global');

exports.run = function (callback) {
    inquirer.prompt([{
        name: 'conform',
        message: `是否开始编译工程？`,
        type: 'list',
        default: 0,
        choices: [{
            name: '是',
            value: 1
        }, {
            name: '否',
            value: 0
        }]
    }]).then(function (answers) {
        if (answers.conform){
            exec(`npm run build`);
            callback();
        }else{
            callback();
        }
    })
}